import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './styles/toutiao-icon.css'
import './github-markdown.css'
import Vant, { CountDown } from 'vant'

import 'vant/lib/index.css'
import './styles/index.less'
import 'amfe-flexible'// 引入适配的包rem(html根节点大小)
import dayjs from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import 'dayjs/locale/zh-cn'// 引入英文
dayjs.extend(relativeTime)
dayjs.locale('zh-cn') // 英文全局使用
Vue.use(CountDown)
Vue.use(Vant)
// Vue.use(less)
Vue.config.productionTip = false

Vue.filter('relativeTime', (val) => {
  // return dayjs(val).format('YYYY-MM-DD')先在全局main.js里定义
  return dayjs().to(val)// 英文版
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
